package com.dingding.service.activity.core.dao.impl;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.dingding.common.core.base.dao.impl.BaseDaoImpl;
import com.dingding.common.core.beans.CouponRelActivity;
import com.dingding.service.activity.core.dao.ICouponRelActivityDao;
import com.dingding.service.activity.core.sql.ActivitySQL;

/**
 * @ClassName: CouponRelActivityDaoImpl 
 * @Description: 优惠券与活动关联关系表 
 * @author YHQ
 * @date 2016年5月27日 下午8:20:28
 */
@Component("couponRelActivityDao")
public class CouponRelActivityDaoImpl extends BaseDaoImpl<CouponRelActivity> implements ICouponRelActivityDao {

	/**
	 * @Title: getCouponRelActivityInfo 
	 * @Description: 根据邀请码获取要赠送的优惠券信息 
	 * @param activityId 活动ID
	 * @author YHQ 
	 * @return Object[]    返回类型
	 */
	@Override
	@Transactional(readOnly=true)
	public Object[] getCouponRelActivityInfo(String activityId) {
		
		//根据邀请码获取要赠送的优惠券信息
		Object[] object = null;
		try {
			object = super.sqlQueryUnResultObj(ActivitySQL.GET_COUPON_INFO, activityId);
		} catch (Exception e) {
			log.error("根据邀请码获取要赠送的优惠券信息时出现异常    类:"+this.getClass()+" exchangeActivity()", e);
		}
		
		return object;
	}

	
	
}
